/**
 * Created by Administrator on 2017/5/10 0010.
 */

$(window).scroll(function () {
    if($(document).scrollTop()>=200){
        $('.nav_left').css({'position':'fixed','top':'0','height':'100%'});
    }else {
        $('.nav_left').css({'position':'absolute','top':'195px'});
    }
})

$('.listAttention').on('click','div',function () {
    $('.listAttention a').slideToggle();
    $(this).children('span').toggleClass('foldedtog');
});

//图片加载失败情况
function onErrorHandle(obj){
    obj.src="../img/defaultAvatar.png";
}

$('#keyword').keydown(function(e){
    if(e.keyCode==13){
       $('#startSearch').trigger("click")
        $('#startSearch_touzi').trigger('click');
        $('#startSearch_daoshi').trigger('click');
    }
});

$('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
    $('#keyword').val('');
    // 获取已激活的标签页的名称
 if($(e.target).text()=='双创团队'){
     $('#startSearch').trigger("click")
 } else if($(e.target).text()=='投资人'){
     $('#startSearch_touzi').trigger('click');
 }else if($(e.target).text()=='导师'){
     $('#startSearch_daoshi').trigger('click');
 }



});






